The World Happiness Index measures happiness based on respondent’s ratings of their own lives. The report offers a way to measure people’s quality of life and the effectiveness of the governments beyond gross domestic product and other economic indicators. By focusing on national well being, a country can take a more wholistic approach to improving their populace’s lives. The United Nations conducts the survey based on a ladder system by asking respondents to rate the best possible life at 10 and the worst possible life being a 0. Respondents from 155 countries are then asked to rate their own current lives on that 0 to 10 scale.
source("scripts/summary_info.R")
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
dataset <- read.csv(
file = "data/world-happiness/2017.csv",
stringsAsFactors = FALSE)
summary_list <- get_summary_info(dataset)
The World Happiness Index surveyed 155 countries. The happiest country in the world in 2017 was Norway with a score of 7.5370002. The unhappiest country in the world was Central African Republic with a score of 2.6930001
<<<<<<< HEAD##Including Table
library(knitr)
source("scripts/table_script.R")
table <- aggregate_table(dataset)
kable(table)
| GDP_per_capita | Average_happiness_score |
|---|---|
| 0.00 | 2.693000 |
| 0.02 | 5.151000 |
| 0.09 | 3.592500 |
| 0.12 | 3.533000 |
| 0.16 | 4.028000 |
| 0.23 | 4.260000 |
| 0.24 | 3.507000 |
| 0.31 | 3.569500 |
| 0.34 | 4.460000 |
| 0.35 | 4.032000 |
| 0.37 | 4.082000 |
| 0.38 | 3.978000 |
| 0.40 | 3.692500 |
| 0.43 | 3.657000 |
| 0.44 | 3.936000 |
| 0.48 | 4.562333 |
| 0.51 | 3.349000 |
| 0.52 | 4.424500 |
| 0.56 | 4.624000 |
| 0.59 | 4.100500 |
| 0.60 | 4.450667 |
| 0.64 | 4.514000 |
| 0.65 | 4.292000 |
| 0.66 | 4.139000 |
| 0.67 | 4.120000 |
| 0.72 | 4.775000 |
| 0.73 | 5.429333 |
| 0.74 | 6.071000 |
| 0.78 | 4.268000 |
| 0.79 | 5.120000 |
| 0.81 | 4.291000 |
| 0.83 | 5.823000 |
| 0.86 | 4.612500 |
| 0.87 | 6.454000 |
| 0.88 | 5.235000 |
| 0.89 | 4.553500 |
| 0.90 | 4.376000 |
| 0.91 | 5.979500 |
| 0.93 | 5.402000 |
| 0.95 | 4.782500 |
| 0.96 | 4.574000 |
| 0.98 | 5.182000 |
| 0.99 | 5.035500 |
| 1.00 | 5.304667 |
| 1.01 | 4.622500 |
| 1.03 | 4.955000 |
| 1.04 | 5.715000 |
| 1.05 | 4.829000 |
| 1.06 | 5.175000 |
| 1.07 | 5.659000 |
| 1.08 | 5.251500 |
| 1.09 | 5.872000 |
| 1.10 | 5.011000 |
| 1.11 | 6.857000 |
| 1.12 | 4.501500 |
| 1.13 | 5.832000 |
| 1.15 | 5.906000 |
| 1.16 | 4.991667 |
| 1.19 | 6.114000 |
| 1.20 | 4.982500 |
| 1.22 | 5.857333 |
| 1.23 | 6.452000 |
| 1.25 | 6.652000 |
| 1.26 | 5.850000 |
| 1.28 | 5.891000 |
| 1.29 | 5.652000 |
| 1.31 | 5.902000 |
| 1.32 | 5.403000 |
| 1.33 | 6.098000 |
| 1.34 | 6.142500 |
| 1.35 | 6.209500 |
| 1.36 | 5.894500 |
| 1.38 | 6.808000 |
| 1.40 | 5.901000 |
| 1.41 | 7.314000 |
| 1.42 | 5.920000 |
| 1.43 | 6.432000 |
| 1.44 | 7.091500 |
| 1.46 | 6.891000 |
| 1.48 | 7.406500 |
| 1.49 | 6.832000 |
| 1.50 | 7.377000 |
| 1.53 | 6.344000 |
| 1.54 | 6.977000 |
| 1.55 | 6.232500 |
| 1.56 | 7.494000 |
| 1.62 | 7.537000 |
| 1.63 | 6.376500 |
| 1.69 | 6.572000 |
| 1.74 | 6.863000 |
| 1.87 | 6.375000 |
source("scripts/happy_analysis.R")
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout